Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Remove type params from Response #772

Merged
merged 2 commits into from
Jan 6, 2022

Conversation

tusharmath
Copy link
Collaborator

@tusharmath tusharmath commented Jan 6, 2022

The main reason for doing this is Scala 2's limiting capability with type inference.
This solution should ideally allow us to create middleware on Http and not just HttpApp.
This will also allow us to write constraints such as IsResponse and IsRequest which wasn't getting inferred before in Scala 2.

Depends on #769

Feature

  • Add wrapZIO operator on Response
  • Rename socket to fromSocket in Response
  • Add toSocketApp and toResponse on Socket

@tusharmath tusharmath added Breaking Change enhancement New feature or request labels Jan 6, 2022
@tusharmath tusharmath force-pushed the refactor/remove-type-params-response branch from ec7698e to 8b64e5f Compare January 6, 2022 11:40
@github-actions github-actions bot added the maintenance Chore or Maintenance tasks label Jan 6, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2022

Codecov Report

Merging #772 (8b64e5f) into main (df11745) will increase coverage by 0.57%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #772      +/-   ##
==========================================
+ Coverage   51.01%   51.58%   +0.57%     
==========================================
  Files          69       68       -1     
  Lines        2074     2082       +8     
  Branches       57       61       +4     
==========================================
+ Hits         1058     1074      +16     
+ Misses       1016     1008       -8     
Impacted Files Coverage Δ
...http/src/main/scala/zhttp/http/CanBeSilenced.scala 0.00% <ø> (ø)
zio-http/src/main/scala/zhttp/http/HttpError.scala 0.00% <0.00%> (ø)
zio-http/src/main/scala/zhttp/http/Patch.scala 58.33% <0.00%> (ø)
zio-http/src/main/scala/zhttp/http/package.scala 50.00% <ø> (ø)
...io-http/src/main/scala/zhttp/service/Handler.scala 67.44% <ø> (ø)
...ala/zhttp/service/server/ServerSocketHandler.scala 30.76% <ø> (ø)
.../scala/zhttp/service/server/WebSocketUpgrade.scala 100.00% <ø> (ø)
zio-http/src/main/scala/zhttp/http/Response.scala 70.68% <56.25%> (+1.45%) ⬆️
...o-http/src/main/scala/zhttp/socket/SocketApp.scala 26.47% <60.00%> (+23.44%) ⬆️
zio-http/src/main/scala/zhttp/http/Http.scala 64.95% <66.66%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df11745...8b64e5f. Read the comment docs.

@tusharmath tusharmath force-pushed the refactor/remove-type-params-response branch from 7ae7e0c to 7fa4cca Compare January 6, 2022 13:43
@amitksingh1490 amitksingh1490 merged commit 2d26f13 into main Jan 6, 2022
@amitksingh1490 amitksingh1490 deleted the refactor/remove-type-params-response branch January 6, 2022 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change enhancement New feature or request maintenance Chore or Maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants